<?php


require_once(dirname(__FILE__).'/../../common/log.php');
require_once(dirname(__FILE__).'/../../common/defines.php');
require_once(dirname(__FILE__).'/../../common/return.php');

require_once(dirname(__FILE__).'/send_sms.php');


$body  = file_get_contents('php://input');
$data  = json_decode($body, true);
logd("recv: ".$body);
if (empty($data['content']))
{
    failure(ERR_PARAM);
}

success();
$ret  = send_notice_sms('+8613518101821', $data['content']);
if ($ret['code'] == '200')
{
    success();
}
else
{
    failure(-10, '发送失败');
}

